//
//  LTXHUD.h
//  LTXShortVideo
//
//  Created by Macbook on 2019/3/29.
//  Copyright © 2019 com.xin. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface LTXHUD : UIView

// 显示转圈加载，调用dismiss、showMessage等方法隐藏，常用于已有视图上提交加载数据
+ (void)show;

// 显示加载，在特定视图
+ (void)showInView:(UIView *)view;

// 空页面显示加载动画，常用于未创建视图时加载数据，创建控件
+ (void)showWhilePushing;

// 加载动画，传YES显示空页面显示加载动画，传NO显示转圈加载动画
+ (void)showWhilePushing:(BOOL)pushing;

// 显示文字，默认两秒后消失
+ (void)showMessage:(NSString *)message;

// 显示文字，默认两秒后消失，在特定视图
+ (void)showMessage:(NSString *)message inView:(UIView *)view;

// 显示文字，设置显示时长
+ (void)showMessage:(NSString *)message duration:(NSTimeInterval)duration;

// 显示文字，设置显示时长，在特定视图
+ (void)showMessage:(NSString *)message duration:(NSTimeInterval)duration inView:(UIView *)view;

// 隐藏
+ (void)dismiss;

/**
 提示弹窗
 */
+ (void)showAlertWithTitle:(NSString *)title sureMessage:(NSString *)sureMessage cancelMessage:(NSString *)cancelMessage warningMessage:(NSString *)warningMessage style:(UIAlertControllerStyle)UIAlertControllerStyle target:(id)target sureHandler:(void(^)(UIAlertAction *action))sureHandler cancelHandler:(void(^)(UIAlertAction *action))cancelHandler warningHandler:(void(^)(UIAlertAction *action))warningHandler;
+ (void)showAlertWithTitle:(NSString *)title target:(id)target sureHandler:(void(^)(UIAlertAction *action))sureHandler cancelHandler:(void(^)(UIAlertAction *action))cancelHandler;
@end

NS_ASSUME_NONNULL_END


//a
